package com.prawn.predict.client.impl;

import com.prawn.predict.client.DataRecordClient;
import com.prawn.predict.pojo.DataRecord;
import entity.PageResult;
import entity.Result;
import entity.StatusCode;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * @Auther: zhy
 * @Date: 2019/7/25
 * @Description:
 */
@Component
public class DataRecordClientImpl implements DataRecordClient {

    /**
     * 分页+多条件查询
     * @param searchMap 查询条件封装
     * @param page 页码
     * @param size 页大小
     * @return 分页结果
     */
    @RequestMapping(value="/search/searchforpredict/{page}/{size}",method= RequestMethod.POST)
    public PageResult<DataRecord> findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){
        System.out.println("熔断器触发...");
        return null;
    }


}
